Optimal. Leaf size=105 \[ -\frac {F_1\left (1-n;\frac {1}{4},\frac {1}{4}-n;2-n;\cos (c+d x),-\cos (c+d x)\right ) \sqrt [4]{1-\cos (c+d x)} \cos (c+d x) (1+\cos (c+d x))^{\frac {1}{4}-n} (a+a \sec (c+d x))^n}{d (1-n) \sqrt {\sin (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 105, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3961, 2965,
140, 138} \begin {gather*} -\frac {\sqrt [4]{1-\cos (c+d x)} \cos (c+d x) (\cos (c+d x)+1)^{\frac {1}{4}-n} (a \sec (c+d x)+a)^n F_1\left (1-n;\frac {1}{4},\frac {1}{4}-n;2-n;\cos (c+d x),-\cos (c+d x)\right )}{d (1-n) \sqrt {\sin (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 138
Rule 140
Rule 2965
Rule 3961
Rubi steps
\begin {align*} \int (a+a \sec (c+d x))^n \sqrt {\sin (c+d x)} \, dx &=\left ((-\cos (c+d x))^n (-a-a \cos (c+d x))^{-n} (a+a \sec (c+d x))^n\right ) \int (-\cos (c+d x))^{-n} (-a-a \cos (c+d x))^n \sqrt {\sin (c+d x)} \, dx\\ &=-\frac {\left ((-\cos (c+d x))^n (-a-a \cos (c+d x))^{\frac {1}{4}-n} \sqrt [4]{-a+a \cos (c+d x)} (a+a \sec (c+d x))^n\right ) \text {Subst}\left (\int \frac {(-x)^{-n} (-a-a x)^{-\frac {1}{4}+n}}{\sqrt [4]{-a+a x}} \, dx,x,\cos (c+d x)\right )}{d \sqrt {\sin (c+d x)}}\\ &=-\frac {\left ((-\cos (c+d x))^n (1+\cos (c+d x))^{\frac {1}{4}-n} \sqrt [4]{-a+a \cos (c+d x)} (a+a \sec (c+d x))^n\right ) \text {Subst}\left (\int \frac {(-x)^{-n} (1+x)^{-\frac {1}{4}+n}}{\sqrt [4]{-a+a x}} \, dx,x,\cos (c+d x)\right )}{d \sqrt {\sin (c+d x)}}\\ &=-\frac {\left (\sqrt [4]{1-\cos (c+d x)} (-\cos (c+d x))^n (1+\cos (c+d x))^{\frac {1}{4}-n} (a+a \sec (c+d x))^n\right ) \text {Subst}\left (\int \frac {(-x)^{-n} (1+x)^{-\frac {1}{4}+n}}{\sqrt [4]{1-x}} \, dx,x,\cos (c+d x)\right )}{d \sqrt {\sin (c+d x)}}\\ &=-\frac {F_1\left (1-n;\frac {1}{4},\frac {1}{4}-n;2-n;\cos (c+d x),-\cos (c+d x)\right ) \sqrt [4]{1-\cos (c+d x)} \cos (c+d x) (1+\cos (c+d x))^{\frac {1}{4}-n} (a+a \sec (c+d x))^n}{d (1-n) \sqrt {\sin (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(214\) vs. \(2(105)=210\).
time = 1.98, size = 214, normalized size = 2.04 \begin {gather*} \frac {14 F_1\left (\frac {3}{4};n,\frac {3}{2};\frac {7}{4};\tan ^2\left (\frac {1}{2} (c+d x)\right ),-\tan ^2\left (\frac {1}{2} (c+d x)\right )\right ) (1+\cos (c+d x)) (a (1+\sec (c+d x)))^n \sin ^{\frac {3}{2}}(c+d x)}{d \left (6 \left (3 F_1\left (\frac {7}{4};n,\frac {5}{2};\frac {11}{4};\tan ^2\left (\frac {1}{2} (c+d x)\right ),-\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )-2 n F_1\left (\frac {7}{4};1+n,\frac {3}{2};\frac {11}{4};\tan ^2\left (\frac {1}{2} (c+d x)\right ),-\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )\right ) (-1+\cos (c+d x))+21 F_1\left (\frac {3}{4};n,\frac {3}{2};\frac {7}{4};\tan ^2\left (\frac {1}{2} (c+d x)\right ),-\tan ^2\left (\frac {1}{2} (c+d x)\right )\right ) (1+\cos (c+d x))\right )} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.09, size = 0, normalized size = 0.00 \[\int \left (a +a \sec \left (d x +c \right )\right )^{n} \left (\sqrt {\sin }\left (d x +c \right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a \left (\sec {\left (c + d x \right )} + 1\right )\right )^{n} \sqrt {\sin {\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \sqrt {\sin \left (c+d\,x\right )}\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^n \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________